package dao.impl;

import dao.UserDao;
import entity.User;
import util.JdbcUtil;

import java.sql.SQLException;

public class UserDaoImpl implements UserDao {
    @Override
    public User login(String name, String password) throws SQLException {
        return JdbcUtil.queryOne(User.class,
                "select * from user where name = ? and password = ?",
                name, password);
    }
}
